﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DBBase;
using System.Threading;
using System.Xml;


using System.Web;

using System.Runtime.InteropServices;
using System.IO;
using System.Data.OleDb;
using System.Data.SqlClient;

namespace Business
{
    public partial class jianchexianxinxi18c02 : Form
    {
        public MainForm m_mainform;

        public static string sDataBaseIp;
        public static string sDataBaseName;
        public static string sDataBaseUserName;
        public static string sDataBasePwd;
        public static string sWebService = "";
        public static string sjyjgbh = "";
        public static string ssqm = "";
        private TextBox[] ctextbox;
        public static string[] cgjd;
        public jianchexianxinxi18c02()
        {
            InitializeComponent();
           
            ctextbox = new TextBox[76] { textBox1, textBox2, textBox3, textBox4, textBox5, textBox6, textBox7, textBox8, textBox9, textBox10, textBox11, textBox12, textBox13, textBox14, textBox15, textBox16, textBox17, textBox18, textBox19, textBox20, textBox21, textBox22, textBox23, textBox24, textBox25, textBox26, textBox27, textBox28, textBox29, textBox30, textBox31, textBox32, textBox33, textBox34, textBox35, textBox36, textBox37, textBox38, textBox39, textBox40, textBox41, textBox42, textBox43, textBox44, textBox45, textBox46, textBox47, textBox48, textBox49, textBox50, textBox51, textBox52, textBox53, textBox54, textBox55, textBox56, textBox57, textBox58, textBox59, textBox60, textBox61, textBox62, textBox63, textBox64, textBox65, textBox66, textBox67, textBox68, textBox69, textBox70, textBox71, textBox72, textBox73, textBox74, textBox75, textBox76 };
            cgjd = new string[76] { "jczbh", "jcxxh", "jczmc", "jcxmc", "jcxlb", "jcxczfs", "zdsbmc", "zdsbxh", "zdsbsccj", "zdjcsj", "zdjcfs", "pbzs", "dpbcd", "pbjj", "gtszdtzs", "gtszdttjfs", "zdsbqysj", "zdsbjdyxqz", "zdsbzt", "dgsbmc", "dgsbxh", "dgsbsccj", "dgjcsj", "dgjcfs", "dgcspyxz", "dgsbqysj", "dgsbjdyxqz", "dgsbzt", "sdsbmc", "sdsbxh", "sdsbsccj", "sdjcsj", "sdsbqysj", "sdsbjdyxqz", "sdsbzt", "chsbmc", "chsbxh", "chsbsccj", "chjcsj", "chsbqysj", "chsbjdyxqz", "chsbzt", "czsbmc", "czsbxh", "czsbsccj", "czjcsj", "czjb", "czsbjdyxqz", "czsbqysj", "czsbzt", "qxjcsj", "gw1", "gw2", "gw3", "gw4", "gw5", "gw6", "gw7", "gw8", "gw9", "bz", "fzjg", "glbm", "gxrq", "zdsbbh", "zdsbjdzsbh", "dgsbbh", "dgsbjdzsbh", "sdsbbh", "sdsbjdzsbh", "chsbbh", "chsbjdzsbh", "czsbbh", "czsbjdzsbh", "zt", "ztyy" };
            getbiaozhun();
        }
       
        public string decode(string str)//utf8转中文
        {
            Encoding utf8 = Encoding.UTF8;
            // 首先用utf-8进行解码                    
            return HttpUtility.UrlDecode(str.ToUpper(), utf8);
        }
        public string encode(string str)//中文转utf8
        {
            Encoding utf8 = Encoding.UTF8;
            return HttpUtility.UrlEncode(str, utf8);
        }
        public void getbiaozhun()
        {
            Query objquery = new Query();
            string ssqlex = "";
            ssqlex = string.Format(@"Select * From  jiancexianxinxi ");
            DataTable dt = objquery.GetTable(ssqlex);
            if (dt.Rows.Count > 0)
            {
                for (int i = 0; i < 1; i++)
                {

                    textBox1.Text = dt.Rows[i]["textBox1"].ToString().Trim();
                    textBox2.Text = dt.Rows[i]["textBox2"].ToString().Trim();
                    textBox3.Text = dt.Rows[i]["textBox3"].ToString().Trim();
                    textBox4.Text = dt.Rows[i]["textBox4"].ToString().Trim();
                    textBox5.Text = dt.Rows[i]["textBox5"].ToString().Trim();
                    textBox6.Text = dt.Rows[i]["textBox6"].ToString().Trim();
                    textBox7.Text = dt.Rows[i]["textBox7"].ToString().Trim();
                    textBox8.Text = dt.Rows[i]["textBox8"].ToString().Trim();
                    textBox9.Text = dt.Rows[i]["textBox9"].ToString().Trim();
                    textBox10.Text = dt.Rows[i]["textBox10"].ToString().Trim();
                    textBox11.Text = dt.Rows[i]["textBox11"].ToString().Trim();
                    textBox12.Text = dt.Rows[i]["textBox12"].ToString().Trim();
                    textBox13.Text = dt.Rows[i]["textBox13"].ToString().Trim();
                    textBox14.Text = dt.Rows[i]["textBox14"].ToString().Trim();
                    textBox15.Text = dt.Rows[i]["textBox15"].ToString().Trim();
                    textBox16.Text = dt.Rows[i]["textBox16"].ToString().Trim();
                    textBox17.Text = dt.Rows[i]["textBox17"].ToString().Trim();
                    textBox18.Text = dt.Rows[i]["textBox18"].ToString().Trim();
                    textBox19.Text = dt.Rows[i]["textBox19"].ToString().Trim();
                    textBox20.Text = dt.Rows[i]["textBox20"].ToString().Trim();
                    textBox21.Text = dt.Rows[i]["textBox21"].ToString().Trim();
                    textBox22.Text = dt.Rows[i]["textBox22"].ToString().Trim();
                    textBox23.Text = dt.Rows[i]["textBox23"].ToString().Trim();
                    textBox24.Text = dt.Rows[i]["textBox24"].ToString().Trim();
                    textBox25.Text = dt.Rows[i]["textBox25"].ToString().Trim();
                    textBox26.Text = dt.Rows[i]["textBox26"].ToString().Trim();
                    textBox27.Text = dt.Rows[i]["textBox27"].ToString().Trim();
                    textBox28.Text = dt.Rows[i]["textBox28"].ToString().Trim();
                    textBox29.Text = dt.Rows[i]["textBox29"].ToString().Trim();
                    textBox30.Text = dt.Rows[i]["textBox30"].ToString().Trim();
                    textBox31.Text = dt.Rows[i]["textBox31"].ToString().Trim();
                    textBox32.Text = dt.Rows[i]["textBox32"].ToString().Trim();
                    textBox33.Text = dt.Rows[i]["textBox33"].ToString().Trim();
                    textBox34.Text = dt.Rows[i]["textBox34"].ToString().Trim();
                    textBox35.Text = dt.Rows[i]["textBox35"].ToString().Trim();
                    textBox36.Text = dt.Rows[i]["textBox36"].ToString().Trim();
                    textBox37.Text = dt.Rows[i]["textBox37"].ToString().Trim();
                    textBox38.Text = dt.Rows[i]["textBox38"].ToString().Trim();
                    textBox39.Text = dt.Rows[i]["textBox39"].ToString().Trim();
                    textBox40.Text = dt.Rows[i]["textBox40"].ToString().Trim();
                    textBox41.Text = dt.Rows[i]["textBox41"].ToString().Trim();
                    textBox42.Text = dt.Rows[i]["textBox42"].ToString().Trim();
                    textBox43.Text = dt.Rows[i]["textBox43"].ToString().Trim();
                    textBox44.Text = dt.Rows[i]["textBox44"].ToString().Trim();
                    textBox45.Text = dt.Rows[i]["textBox45"].ToString().Trim();
                    textBox46.Text = dt.Rows[i]["textBox46"].ToString().Trim();
                    textBox47.Text = dt.Rows[i]["textBox47"].ToString().Trim();
                    textBox48.Text = dt.Rows[i]["textBox48"].ToString().Trim();
                    textBox49.Text = dt.Rows[i]["textBox49"].ToString().Trim();
                    textBox50.Text = dt.Rows[i]["textBox50"].ToString().Trim();
                    textBox51.Text = dt.Rows[i]["textBox51"].ToString().Trim();
                    textBox52.Text = dt.Rows[i]["textBox52"].ToString().Trim();
                    textBox53.Text = dt.Rows[i]["textBox53"].ToString().Trim();
                    textBox54.Text = dt.Rows[i]["textBox54"].ToString().Trim();
                    textBox55.Text = dt.Rows[i]["textBox55"].ToString().Trim();
                    textBox56.Text = dt.Rows[i]["textBox56"].ToString().Trim();
                    textBox57.Text = dt.Rows[i]["textBox57"].ToString().Trim();
                    textBox58.Text = dt.Rows[i]["textBox58"].ToString().Trim();
                    textBox59.Text = dt.Rows[i]["textBox59"].ToString().Trim();
                    textBox60.Text = dt.Rows[i]["textBox60"].ToString().Trim();
                    textBox61.Text = dt.Rows[i]["textBox61"].ToString().Trim();
                    textBox62.Text = dt.Rows[i]["textBox62"].ToString().Trim();
                    textBox63.Text = dt.Rows[i]["textBox63"].ToString().Trim();
                    textBox64.Text = dt.Rows[i]["textBox64"].ToString().Trim();
                    textBox65.Text = dt.Rows[i]["textBox65"].ToString().Trim();
                    textBox66.Text = dt.Rows[i]["textBox66"].ToString().Trim();
                    textBox67.Text = dt.Rows[i]["textBox67"].ToString().Trim();
                    textBox68.Text = dt.Rows[i]["textBox68"].ToString().Trim();
                    textBox69.Text = dt.Rows[i]["textBox69"].ToString().Trim();
                    textBox70.Text = dt.Rows[i]["textBox70"].ToString().Trim();
                    textBox71.Text = dt.Rows[i]["textBox71"].ToString().Trim();
                    textBox72.Text = dt.Rows[i]["textBox72"].ToString().Trim();
                    textBox73.Text = dt.Rows[i]["textBox73"].ToString().Trim();
                    textBox74.Text = dt.Rows[i]["textBox74"].ToString().Trim();
                    textBox75.Text = dt.Rows[i]["textBox75"].ToString().Trim();
                    textBox76.Text = dt.Rows[i]["textBox76"].ToString().Trim();

                }
            }
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Query objquery = new Query();
            string ssqlex = "";
            ssqlex = string.Format(@"Select * From  jiancexianxinxi where textBox1='{0}' and textBox2='{1}'", textBox1.Text, textBox2.Text);
            if (objquery.ExecuteS(ssqlex))
            {

                ssqlex = string.Format(@"update jiancexianxinxi set 
                                        textBox1='{0}',
                                        textBox2='{1}',
                                        textBox3='{2}',
                                        textBox4='{3}',
                                        textBox5='{4}',
                                        textBox6='{5}',
                                        textBox7='{6}',
                                        textBox8='{7}',
                                        textBox9='{8}',
                                        textBox10='{9}',
                                        textBox11='{10}',
                                        textBox12='{11}',
                                        textBox13='{12}',
                                        textBox14='{13}',
                                        textBox15='{14}',
                                        textBox16='{15}',
                                        textBox17='{16}',
                                        textBox18='{17}',
                                        textBox19='{18}',
                                        textBox20='{19}',
                                        textBox21='{20}',
                                        textBox22='{21}',
                                        textBox23='{22}',
                                        textBox24='{23}',
                                        textBox25='{24}',
                                        textBox26='{25}',
                                        textBox27='{26}',
                                        textBox28='{27}',
                                        textBox29='{28}',
                                        textBox30='{29}',
                                        textBox31='{30}',
                                        textBox32='{31}',
                                        textBox33='{32}',
                                        textBox34='{33}',
                                        textBox35='{34}',
                                        textBox36='{35}',
                                        textBox37='{36}',
                                        textBox38='{37}',
                                        textBox39='{38}',
                                        textBox40='{39}',
                                        textBox41='{40}',
                                        textBox42='{41}',
                                        textBox43='{42}',
                                        textBox44='{43}',
                                        textBox45='{44}',
                                        textBox46='{45}',
                                        textBox47='{46}',
                                        textBox48='{47}',
                                        textBox49='{48}',
                                        textBox50='{49}',
                                        textBox51='{50}',
                                        textBox52='{51}',
                                        textBox53='{52}',
                                        textBox54='{53}',
                                        textBox55='{54}',
                                        textBox56='{55}',
                                        textBox57='{56}',
                                        textBox58='{57}',
                                        textBox59='{58}',
                                        textBox60='{59}',
                                        textBox61='{60}',
                                        textBox62='{61}',
                                        textBox63='{62}',
                                        textBox64='{63}',
                                        textBox65='{64}',
                                        textBox66='{65}',
                                        textBox67='{66}',
                                        textBox68='{67}',
                                        textBox69='{68}',
                                        textBox70='{69}',
                                        textBox71='{70}',
                                        textBox72='{71}',
                                        textBox73='{72}',
                                        textBox74='{73}',
                                        textBox75='{74}',
                                        textBox76='{75}' where textBox1='{76}' and textBox2='{77}'", 
                                        textBox1.Text,
                                        textBox2.Text,
                                        textBox3.Text,
                                        textBox4.Text,
                                        textBox5.Text,
                                        textBox6.Text,
                                        textBox7.Text,
                                        textBox8.Text,
                                        textBox9.Text,
                                        textBox10.Text,
                                        textBox11.Text,
                                        textBox12.Text,
                                        textBox13.Text,
                                        textBox14.Text,
                                        textBox15.Text,
                                        textBox16.Text,
                                        textBox17.Text,
                                        textBox18.Text,
                                        textBox19.Text,
                                        textBox20.Text,
                                        textBox21.Text,
                                        textBox22.Text,
                                        textBox23.Text,
                                        textBox24.Text,
                                        textBox25.Text,
                                        textBox26.Text,
                                        textBox27.Text,
                                        textBox28.Text,
                                        textBox29.Text,
                                        textBox30.Text,
                                        textBox31.Text,
                                        textBox32.Text,
                                        textBox33.Text,
                                        textBox34.Text,
                                        textBox35.Text,
                                        textBox36.Text,
                                        textBox37.Text,
                                        textBox38.Text,
                                        textBox39.Text,
                                        textBox40.Text,
                                        textBox41.Text,
                                        textBox42.Text,
                                        textBox43.Text,
                                        textBox44.Text,
                                        textBox45.Text,
                                        textBox46.Text,
                                        textBox47.Text,
                                        textBox48.Text,
                                        textBox49.Text,
                                        textBox50.Text,
                                        textBox51.Text,
                                        textBox52.Text,
                                        textBox53.Text,
                                        textBox54.Text,
                                        textBox55.Text,
                                        textBox56.Text,
                                        textBox57.Text,
                                        textBox58.Text,
                                        textBox59.Text,
                                        textBox60.Text,
                                        textBox61.Text,
                                        textBox62.Text,
                                        textBox63.Text,
                                        textBox64.Text,
                                        textBox65.Text,
                                        textBox66.Text,
                                        textBox67.Text,
                                        textBox68.Text,
                                        textBox69.Text,
                                        textBox70.Text,
                                        textBox71.Text,
                                        textBox72.Text,
                                        textBox73.Text,
                                        textBox74.Text,
                                        textBox75.Text,
                                        textBox76.Text,
                                        textBox1.Text, textBox2.Text);
                if (!objquery.UpdateTable(ssqlex))
                {
                    MessageBox.Show("修改失败");
                }
                //保存操作日记
                m_mainform.savecaozuoriji(ssqlex, "更新", "业务系统", "更新检测线信息");
            }
            else
            {
                
                ssqlex = string.Format(@"insert into jiancexianxinxi (
                                        textBox1,
                                        textBox2,
                                        textBox3,
                                        textBox4,
                                        textBox5,
                                        textBox6,
                                        textBox7,
                                        textBox8,
                                        textBox9,
                                        textBox10,
                                        textBox11,
                                        textBox12,
                                        textBox13,
                                        textBox14,
                                        textBox15,
                                        textBox16,
                                        textBox17,
                                        textBox18,
                                        textBox19,
                                        textBox20,
                                        textBox21,
                                        textBox22,
                                        textBox23,
                                        textBox24,
                                        textBox25,
                                        textBox26,
                                        textBox27,
                                        textBox28,
                                        textBox29,
                                        textBox30,
                                        textBox31,
                                        textBox32,
                                        textBox33,
                                        textBox34,
                                        textBox35,
                                        textBox36,
                                        textBox37,
                                        textBox38,
                                        textBox39,
                                        textBox40,
                                        textBox41,
                                        textBox42,
                                        textBox43,
                                        textBox44,
                                        textBox45,
                                        textBox46,
                                        textBox47,
                                        textBox48,
                                        textBox49,
                                        textBox50,
                                        textBox51,
                                        textBox52,
                                        textBox53,
                                        textBox54,
                                        textBox55,
                                        textBox56,
                                        textBox57,
                                        textBox58,
                                        textBox59,
                                        textBox60,
                                        textBox61,
                                        textBox62,
                                        textBox63,
                                        textBox64,
                                        textBox65,
                                        textBox66,
                                        textBox67,
                                        textBox68,
                                        textBox69,
                                        textBox70,
                                        textBox71,
                                        textBox72,
                                        textBox73,
                                        textBox74,
                                        textBox75,
                                        textBox76) values (
                                        '{0}',
                                        '{1}',
                                        '{2}',
                                        '{3}',
                                        '{4}',
                                        '{5}',
                                        '{6}',
                                        '{7}',
                                        '{8}',
                                        '{9}',
                                        '{10}',
                                        '{11}',
                                        '{12}',
                                        '{13}',
                                        '{14}',
                                        '{15}',
                                        '{16}',
                                        '{17}',
                                        '{18}',
                                        '{19}',
                                        '{20}',
                                        '{21}',
                                        '{22}',
                                        '{23}',
                                        '{24}',
                                        '{25}',
                                        '{26}',
                                        '{27}',
                                        '{28}',
                                        '{29}',
                                        '{30}',
                                        '{31}',
                                        '{32}',
                                        '{33}',
                                        '{34}',
                                        '{35}',
                                        '{36}',
                                        '{37}',
                                        '{38}',
                                        '{39}',
                                        '{40}',
                                        '{41}',
                                        '{42}',
                                        '{43}',
                                        '{44}',
                                        '{45}',
                                        '{46}',
                                        '{47}',
                                        '{48}',
                                        '{49}',
                                        '{50}',
                                        '{51}',
                                        '{52}',
                                        '{53}',
                                        '{54}',
                                        '{55}',
                                        '{56}',
                                        '{57}',
                                        '{58}',
                                        '{59}',
                                        '{60}',
                                        '{61}',
                                        '{62}',
                                        '{63}',
                                        '{64}',
                                        '{65}',
                                        '{66}',
                                        '{67}',
                                        '{68}',
                                        '{69}',
                                        '{70}',
                                        '{71}',
                                        '{72}',
                                        '{73}',
                                        '{74}',
                                        '{75}')", textBox1.Text,
                                        textBox2.Text,
                                        textBox3.Text,
                                        textBox4.Text,
                                        textBox5.Text,
                                        textBox6.Text,
                                        textBox7.Text,
                                        textBox8.Text,
                                        textBox9.Text,
                                        textBox10.Text,
                                        textBox11.Text,
                                        textBox12.Text,
                                        textBox13.Text,
                                        textBox14.Text,
                                        textBox15.Text,
                                        textBox16.Text,
                                        textBox17.Text,
                                        textBox18.Text,
                                        textBox19.Text,
                                        textBox20.Text,
                                        textBox21.Text,
                                        textBox22.Text,
                                        textBox23.Text,
                                        textBox24.Text,
                                        textBox25.Text,
                                        textBox26.Text,
                                        textBox27.Text,
                                        textBox28.Text,
                                        textBox29.Text,
                                        textBox30.Text,
                                        textBox31.Text,
                                        textBox32.Text,
                                        textBox33.Text,
                                        textBox34.Text,
                                        textBox35.Text,
                                        textBox36.Text,
                                        textBox37.Text,
                                        textBox38.Text,
                                        textBox39.Text,
                                        textBox40.Text,
                                        textBox41.Text,
                                        textBox42.Text,
                                        textBox43.Text,
                                        textBox44.Text,
                                        textBox45.Text,
                                        textBox46.Text,
                                        textBox47.Text,
                                        textBox48.Text,
                                        textBox49.Text,
                                        textBox50.Text,
                                        textBox51.Text,
                                        textBox52.Text,
                                        textBox53.Text,
                                        textBox54.Text,
                                        textBox55.Text,
                                        textBox56.Text,
                                        textBox57.Text,
                                        textBox58.Text,
                                        textBox59.Text,
                                        textBox60.Text,
                                        textBox61.Text,
                                        textBox62.Text,
                                        textBox63.Text,
                                        textBox64.Text,
                                        textBox65.Text,
                                        textBox66.Text,
                                        textBox67.Text,
                                        textBox68.Text,
                                        textBox69.Text,
                                        textBox70.Text,
                                        textBox71.Text,
                                        textBox72.Text,
                                        textBox73.Text,
                                        textBox74.Text,
                                        textBox75.Text,
                                        textBox76.Text);
                if (!objquery.UpdateTable(ssqlex))
                {
                    MessageBox.Show("添加失败");
                }
                //保存操作日记
                m_mainform.savecaozuoriji(ssqlex, "新增", "业务系统", "新增检测线信息");

            }
        }

        private void button2_Click(object sender, EventArgs e)
        {
            Query objquery = new Query();
            string ssqlex = "";
            ssqlex = string.Format(@"delete jiancexianxinxi where textBox1='{0}' and textBox2='{1}'", textBox1.Text, textBox2.Text);
            if (!objquery.UpdateTable(ssqlex))
            {
                MessageBox.Show("删除失败");
            }
            //保存操作日记
            m_mainform.savecaozuoriji(ssqlex, "删除", "业务系统", "删除检测线信息");
            clear();
        }
        public void clear()
        {
            textBox1.Text = "";
            textBox2.Text = "";
            textBox3.Text = "";
            textBox4.Text = "";
            textBox5.Text = "";
            textBox6.Text = "";
            textBox7.Text = "";
            textBox8.Text = "";
            textBox9.Text = "";
            textBox10.Text = "";
            textBox11.Text = "";
            textBox12.Text = "";
            textBox13.Text = "";
            textBox14.Text = "";
            textBox15.Text = "";
            textBox16.Text = "";
            textBox17.Text = "";
            textBox18.Text = "";
            textBox19.Text = "";
            textBox20.Text = "";
            textBox21.Text = "";
            textBox22.Text = "";
            textBox23.Text = "";
            textBox24.Text = "";
            textBox25.Text = "";
            textBox26.Text = "";
            textBox27.Text = "";
            textBox28.Text = "";
            textBox29.Text = "";
            textBox30.Text = "";
            textBox31.Text = "";
            textBox32.Text = "";
            textBox33.Text = "";
            textBox34.Text = "";
            textBox35.Text = "";
            textBox36.Text = "";
            textBox37.Text = "";
            textBox38.Text = "";
            textBox39.Text = "";
            textBox40.Text = "";
            textBox41.Text = "";
            textBox42.Text = "";
            textBox43.Text = "";
            textBox44.Text = "";
            textBox45.Text = "";
            textBox46.Text = "";
            textBox47.Text = "";
            textBox48.Text = "";
            textBox49.Text = "";
            textBox50.Text = "";
            textBox51.Text = "";
            textBox52.Text = "";
            textBox53.Text = "";
            textBox54.Text = "";
            textBox55.Text = "";
            textBox56.Text = "";
            textBox57.Text = "";
            textBox58.Text = "";
            textBox59.Text = "";
            textBox60.Text = "";
            textBox61.Text = "";
            textBox62.Text = "";
            textBox63.Text = "";
            textBox64.Text = "";
            textBox65.Text = "";
            textBox66.Text = "";
            textBox67.Text = "";
            textBox68.Text = "";
            textBox69.Text = "";
            textBox70.Text = "";
            textBox71.Text = "";
            textBox72.Text = "";
            textBox73.Text = "";
            textBox74.Text = "";
            textBox75.Text = "";
            textBox76.Text = "";
        }

        private void button3_Click(object sender, EventArgs e)
        {
            Query objquery = new Query();
            string ssqlex = "";
            ssqlex = string.Format(@"Select * From  jiancexianxinxi where textBox1='{0}' and textBox2='{1}'", textBox1.Text, textBox2.Text);
            if (objquery.ExecuteS(ssqlex))
            {

                ssqlex = string.Format(@"update jiancexianxinxi set 
                                        textBox1='{0}',
                                        textBox2='{1}',
                                        textBox3='{2}',
                                        textBox4='{3}',
                                        textBox5='{4}',
                                        textBox6='{5}',
                                        textBox7='{6}',
                                        textBox8='{7}',
                                        textBox9='{8}',
                                        textBox10='{9}',
                                        textBox11='{10}',
                                        textBox12='{11}',
                                        textBox13='{12}',
                                        textBox14='{13}',
                                        textBox15='{14}',
                                        textBox16='{15}',
                                        textBox17='{16}',
                                        textBox18='{17}',
                                        textBox19='{18}',
                                        textBox20='{19}',
                                        textBox21='{20}',
                                        textBox22='{21}',
                                        textBox23='{22}',
                                        textBox24='{23}',
                                        textBox25='{24}',
                                        textBox26='{25}',
                                        textBox27='{26}',
                                        textBox28='{27}',
                                        textBox29='{28}',
                                        textBox30='{29}',
                                        textBox31='{30}',
                                        textBox32='{31}',
                                        textBox33='{32}',
                                        textBox34='{33}',
                                        textBox35='{34}',
                                        textBox36='{35}',
                                        textBox37='{36}',
                                        textBox38='{37}',
                                        textBox39='{38}',
                                        textBox40='{39}',
                                        textBox41='{40}',
                                        textBox42='{41}',
                                        textBox43='{42}',
                                        textBox44='{43}',
                                        textBox45='{44}',
                                        textBox46='{45}',
                                        textBox47='{46}',
                                        textBox48='{47}',
                                        textBox49='{48}',
                                        textBox50='{49}',
                                        textBox51='{50}',
                                        textBox52='{51}',
                                        textBox53='{52}',
                                        textBox54='{53}',
                                        textBox55='{54}',
                                        textBox56='{55}',
                                        textBox57='{56}',
                                        textBox58='{57}',
                                        textBox59='{58}',
                                        textBox60='{59}',
                                        textBox61='{60}',
                                        textBox62='{61}',
                                        textBox63='{62}',
                                        textBox64='{63}',
                                        textBox65='{64}',
                                        textBox66='{65}',
                                        textBox67='{66}',
                                        textBox68='{67}',
                                        textBox69='{68}',
                                        textBox70='{69}',
                                        textBox71='{70}',
                                        textBox72='{71}',
                                        textBox73='{72}',
                                        textBox74='{73}',
                                        textBox75='{74}',
                                        textBox76='{75}' where textBox1='{76}' and textBox2='{77}'",
                                        textBox1.Text,
                                        textBox2.Text,
                                        textBox3.Text,
                                        textBox4.Text,
                                        textBox5.Text,
                                        textBox6.Text,
                                        textBox7.Text,
                                        textBox8.Text,
                                        textBox9.Text,
                                        textBox10.Text,
                                        textBox11.Text,
                                        textBox12.Text,
                                        textBox13.Text,
                                        textBox14.Text,
                                        textBox15.Text,
                                        textBox16.Text,
                                        textBox17.Text,
                                        textBox18.Text,
                                        textBox19.Text,
                                        textBox20.Text,
                                        textBox21.Text,
                                        textBox22.Text,
                                        textBox23.Text,
                                        textBox24.Text,
                                        textBox25.Text,
                                        textBox26.Text,
                                        textBox27.Text,
                                        textBox28.Text,
                                        textBox29.Text,
                                        textBox30.Text,
                                        textBox31.Text,
                                        textBox32.Text,
                                        textBox33.Text,
                                        textBox34.Text,
                                        textBox35.Text,
                                        textBox36.Text,
                                        textBox37.Text,
                                        textBox38.Text,
                                        textBox39.Text,
                                        textBox40.Text,
                                        textBox41.Text,
                                        textBox42.Text,
                                        textBox43.Text,
                                        textBox44.Text,
                                        textBox45.Text,
                                        textBox46.Text,
                                        textBox47.Text,
                                        textBox48.Text,
                                        textBox49.Text,
                                        textBox50.Text,
                                        textBox51.Text,
                                        textBox52.Text,
                                        textBox53.Text,
                                        textBox54.Text,
                                        textBox55.Text,
                                        textBox56.Text,
                                        textBox57.Text,
                                        textBox58.Text,
                                        textBox59.Text,
                                        textBox60.Text,
                                        textBox61.Text,
                                        textBox62.Text,
                                        textBox63.Text,
                                        textBox64.Text,
                                        textBox65.Text,
                                        textBox66.Text,
                                        textBox67.Text,
                                        textBox68.Text,
                                        textBox69.Text,
                                        textBox70.Text,
                                        textBox71.Text,
                                        textBox72.Text,
                                        textBox73.Text,
                                        textBox74.Text,
                                        textBox75.Text,
                                        textBox76.Text,
                                        textBox1.Text, textBox2.Text);
                if (!objquery.UpdateTable(ssqlex))
                {
                    MessageBox.Show("修改失败");
                }
                getbiaozhun();
            }
        }

        private void button4_Click(object sender, EventArgs e)
        {
           
        }
        public void lianwangchaxunjieyan()
        {
            string vehispara = "";
            string stoubao = "<?xml version=\"1.0\" encoding=\"GBK\"?>";
            vehispara = stoubao + string.Format("<root><QueryCondition><jczbh>{0}</jczbh></QueryCondition></root>",textBox1.Text);

            WebReference.Service m_sshenhe18C02= new WebReference.Service();
            m_sshenhe18C02.Url = sWebService;
            string str = (m_sshenhe18C02.queryObjectOut("18", ssqm, "18C02", vehispara));

            if (str.Length < 1)
            {
                MessageBox.Show("连接不到服务器");

            }
            else
            {
                XmlDocument xmlstr = new XmlDocument();
                xmlstr.LoadXml(str);
                if (xmlstr.SelectSingleNode("/root/head/code").InnerText == "1")
                {
                    for (int i = 0; i < 76; i++)
                    {
                        ctextbox[i].Text = decode(xmlstr.SelectSingleNode(string.Format(@"/root/body/vehispara/{0}", cgjd[i])).InnerText);
                    }
                }
            }
        }

        private void but_download_Click(object sender, EventArgs e)
        {
            //判断是否核心功能
            if (m_mainform.shxgn.Contains("检测线备案信息下载"))
            {
                m_mainform.baocunhxrj("检测线备案信息下载", string.Format("检测线备案信息下载"), "写入");// 核心功能日记  日记内容
            }
            lianwangchaxunjieyan();
        }

        private void jianchexianxinxi18c02_Load(object sender, EventArgs e)
        {

            Query mquery = new Query();
            string ssql;
            ssql = string.Format(@"Select * From StationInfor ");

            sWebService = mquery.GetDBString(ssql, "SI_WEB");
            sjyjgbh = mquery.GetDBString(ssql, "SI_JCZBH");
            ssqm = mquery.GetDBString(ssql, "SI_SQM");

            //判断是否民警
            if (m_mainform.sfjy.Contains("检测线备案信息下载"))
            {
                if (!m_mainform.SFMJ.Contains("是"))
                {
                    but_download.Enabled = false;
                }
            }

            if (!m_mainform.squanxian.Contains("检测线备案信息下载增加"))
            {
                button1.Enabled = false;
            }

            if (!m_mainform.squanxian.Contains("检测线备案信息下载编辑"))
            {
                button3.Enabled = false;
            }

            if (!m_mainform.squanxian.Contains("检测线备案信息下载删除"))
            {
                button2.Enabled = false;
            }


        }

        private void skinButton1_Click(object sender, EventArgs e)
        {
            StringBuilder vehispara18C74 = new StringBuilder();
            vehispara18C74.AppendFormat("<root><vehispara>");
            vehispara18C74.AppendFormat("<jczbh>{0}</jczbh>", textBox1.Text);
            vehispara18C74.AppendFormat("<jcxxh>{0}</jcxxh>", textBox2.Text);

            vehispara18C74.AppendFormat("<jczmc>{0}</jczmc>", encode(textBox3.Text.Trim()));
            vehispara18C74.AppendFormat("<jcxmc>{0}</jcxmc>", encode(textBox6.Text.Trim()));
            vehispara18C74.AppendFormat("<jcxlb>{0}</jcxlb>", textBox4.Text);
            vehispara18C74.AppendFormat("<jcxczfs>{0}</jcxczfs>", textBox5.Text);

            vehispara18C74.AppendFormat("<zdsbxh>{0}</zdsbxh>", encode(textBox8.Text.Trim()));
            vehispara18C74.AppendFormat("<zdsbsccj>{0}</zdsbsccj>", encode(textBox9.Text.Trim()));
            vehispara18C74.AppendFormat("<zdjcsj>{0}</zdjcsj>", encode(textBox10.Text.Trim()));
            vehispara18C74.AppendFormat("<zdsbjdyxqz>{0}</zdsbjdyxqz>", encode(textBox18.Text.Trim()));
            vehispara18C74.AppendFormat("<zdsbzt>{0}</zdsbzt>", encode(textBox19.Text.Trim()));

            vehispara18C74.AppendFormat("<dgjcsj>{0}</dgjcsj>", encode(textBox23.Text.Trim()));
            vehispara18C74.AppendFormat("<dgsbjdyxqz>{0}</dgsbjdyxqz>", encode(textBox27.Text.Trim()));
            vehispara18C74.AppendFormat("<dgsbzt>{0}</dgsbzt>", encode(textBox28.Text.Trim()));

            vehispara18C74.AppendFormat("<chsbjdyxqz>{0}</chsbjdyxqz>", encode(textBox41.Text.Trim()));
            vehispara18C74.AppendFormat("<chsbzt>{0}</chsbzt>", encode(textBox42.Text.Trim()));

            vehispara18C74.AppendFormat("<czsbqysj>{0}</czsbqysj>", encode(textBox48.Text.Trim()));
            vehispara18C74.AppendFormat("<czsbzt>{0}</czsbzt>", encode(textBox50.Text.Trim()));
            vehispara18C74.AppendFormat("</vehispara></root>");

            MessageBox.Show(vehispara18C74.ToString());
            WebReference.Service m_sshenhe18C02 = new WebReference.Service();
            m_sshenhe18C02.Url = sWebService;
            string str = (m_sshenhe18C02.writeObjectOut("18", ssqm, "18C74", vehispara18C74.ToString()));
            MessageBox.Show(decode(str));
        }
    }
}
